#!/bin/bash

SOURCE=/media/
DEST=/backup/mirror
LOG=/tmp/mirror-to-backup.log

rm -f "$LOG"
echo "########### drive mirroring starting at $(date) ###########" | tee -a "$LOG"

rsync -ahvAE --delete --stats "$SOURCE" "$DEST" 2>&1 | tee -a "$LOG"

echo "########### drive mirroring completed at $(date) ###########" | tee -a "$LOG"
notify-send -t 10000 " ### MIRRORING COMPLETE ###"
